package com.pzb.wechat.mapper;

import java.util.List;
import com.pzb.wechat.domain.WechatShoppingCart;
import org.apache.ibatis.annotations.Param;

/**
 * 购物车Mapper接口
 * 
 * @author Mr_Wu
 * @date 2022-01-19
 */
public interface WechatShoppingCartMapper 
{

    WechatShoppingCart selectWechatShoppingCart(@Param("openid")String openid, @Param("extAppid")String extAppid, @Param("goodsId")Long goodsId, @Param("goodsUnit")String goodsUnit);

    Integer selectShoppingCartTotal(@Param("openid")String openid, @Param("extAppid")String extAppid);
    /**
     * 查询购物车列表
     * 
     * @param
     * @return 购物车集合
     */
    public List<WechatShoppingCart> selectWechatShoppingCartList(@Param("openid")String openid, @Param("extAppid")String extAppid);

    /**
     * 新增购物车
     * 
     * @param wechatShoppingCart 购物车
     * @return 结果
     */
    public int insertWechatShoppingCart(WechatShoppingCart wechatShoppingCart);

    /**
     * 修改购物车
     * 
     * @param wechatShoppingCart 购物车
     * @return 结果
     */
    public int updateWechatShoppingCart(WechatShoppingCart wechatShoppingCart);


    /**
     * 批量删除购物车
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWechatShoppingCartByIds(List<Long> ids);

    List<WechatShoppingCart> selectWechatShoppingCartListByIds(@Param("extAppid")String extAppid,@Param("cartIds")List<Long> cartIds,@Param("provinceCode")String provinceCode);
}
